package com.example.service.impl;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.entity.Legalperson;
import com.example.entity.ZPerson;
import com.example.mapper.LegalpersonMapper;
import com.example.service.ILegalpersonService;
import com.example.util.page3;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author tyhxzy
 * @since 2023-11-03
 */
@Service
public class LegalpersonServiceImpl implements ILegalpersonService {

    @Autowired
    private LegalpersonMapper legalpersonMapper;
    @Override
    public Legalperson findAll(Integer id) {
        return legalpersonMapper.selectByid(id);
    }

    //分页
    @Override
    public Page<Map> findByParams(page3 page) {
        Page p1 = new Page(page.getPageNo(), page.getPageSize());
        return legalpersonMapper.findByParams(p1, page);
    }


    @Override
    public int add(ZPerson z) {

        return  legalpersonMapper.add(z);
    }

    @Override
    public int addzIdCard(Legalperson legalperson) {
        return legalpersonMapper.addzIdCard(legalperson);
    }

    @Override
    public int addfIdCard(Legalperson legalperson) {
        return legalpersonMapper.addfIdCard(legalperson);
    }

    @Override
    public int addZid(Integer id) {
        return legalpersonMapper.addZid(id);
    }
}
